<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <!-- App favicon -->
    <link rel="shortcut icon" href="/assets/images/favicon.ico">

    <link href="/assets/plugins/jvectormap/jquery-jvectormap-2.0.2.css" rel="stylesheet">

    <!-- App css -->
    <link href="/assets/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="/assets/css/icons.css" rel="stylesheet" type="text/css" />
    <link href="/assets/css/metismenu.min.css" rel="stylesheet" type="text/css" />
    <link href="/assets/css/style.css" rel="stylesheet" type="text/css" />
</head>

<body class="container_12">
    <div class="box round first" style="margin:15px;">
        <h2>更新数据</h2>
        <div class="block">
            <form method="POST" style="width:50%" action="/house/house/update"
                enctype="multipart/form-data">

                <table class="form">
                    <tbody>
                        <tr>
                            <td class="col1">
                                <label>
                                    客房名称</label>
                            </td>
                            <td class="col3">
                                <input name="id" th:value="${model.id}" type="hidden" />
                                <input name="num" value="1" type="hidden" />
                                <input name="rooname" required th:value="${model.rooname}" type="text" class="medium"
                                    id="grumble">
                            </td>
                        </tr>
                        <tr>
                            <td class="col1">
                                <label>
                                    客房大小</label>
                            </td>
                            <td class="col3">

                                <input name="size" required th:value="${model.size}" type="text" class="medium"
                                    id="grumble">
                            </td>
                        </tr>
                        <tr>
                            <td class="col1">
                                <label>
                                    价格</label>
                            </td>
                            <td class="col3">
                                <input name="price" required th:value="${model.price}" type="text" class="medium"
                                    id="grumble">
                            </td>
                        </tr>
                        <tr>
                            <td class="col1">
                                <label>
                                    会员价格</label>
                            </td>
                            <td class="col3">

                                <input name="price2" required th:value="${model.price2}" type="text" class="medium"
                                    id="grumble">
                            </td>
                        </tr>
                        <tr>
                            <td class="col1">
                                <label>
                                    层数</label>
                            </td>
                            <td class="col3">
                                <input name="address" required th:value="${model.address}" type="text" class="medium"
                                    id="grumble">
                            </td>
                        </tr>
                        <tr>

                            <td class="col1">

                                <label>

                                    客房类型</label>

                            </td>

                            <td class="col3">

                                <input name="cate" required th:value="${model.cate}" type="text" class="medium"
                                    id="grumble">
                            </td>

                        </tr>
                        <tr>
                            <td class="col1">
                                <label>
                                    图片</label>
                            </td>

                            <td class="col2">
                                <a th:href="@{${model.thunb}}" target="_blank">
                                    查看
                                </a>
                                <br />
                                <input name="thunb" required th:value="${model.thunb}" type="text" id="thumb">
                                <a href="javascript:;" class="uploadImg btn btn-default">点击上传</a>
                            </td>
                            </td>

                        </tr>

                        <tr>

                            <td>

                                <label>

                                    简介</label>

                            </td>

                            <td>
                                <textarea name="description" required style="width:550px;height:80px;" th:text="${model.description}"></textarea>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <label>
                                    详细描述</label>
                            </td>
                            <td>
                                <textarea name="content" required style="width:550px;height:80px;" th:text="${model.content}"></textarea>
                            </td>
                        </tr>
                        <tr>
                            <td></td>
                            <td colspan="">
                                <button type="submit" class="btn btn-blue">提交数据</button>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </form>
        </div>
    </div>
    <!-- jQuery  -->
    <script src="/assets/js/jquery.min.js"></script>
    <script src="/assets/js/bootstrap.bundle.min.js"></script>
    <script src="/assets/js/metisMenu.min.js"></script>
    <script src="/assets/js/waves.min.js"></script>
    <script src="/assets/js/jquery.slimscroll.min.js"></script>

    <script src="/assets/plugins/jvectormap/jquery-jvectormap-2.0.2.min.js"></script>
    <script src="/assets/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>

    <script src="/assets/plugins/moment/moment.js"></script>
    <script src="/assets/plugins/apexcharts/apexcharts.min.js"></script>        
    <script src="/assets/pages/jquery.dashboard.init.js"></script>
    <!-- App js -->
    <script src="/assets/js/app.js"></script>  
    <script src="/source/scripts/window.js"></script>
    <script src="/source/js2.js"></script>
    <script>
        $().ready(function(){
            $(".uploadImg").click(function(){
                openWindow("/upload.jsp");
            });
            $("#thumb").on("input",function(){
                $(".oldImg").attr("src","/"+$("#thumb").val());
            });
        });
    </script>

</body>

</html>